package com.bl.student.common.enums;

import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

/**
 * Created by yujingyi on 2017/9/20.
 */
@Getter
@AllArgsConstructor
public enum BizActionType {

    NEW("NEW", "活动邀请");

    private String type;
    private String name;

    private static Map<String, BizActionType> enumMap = Maps.newHashMap();
    static {
        for (BizActionType item : values()) {
            enumMap.put(item.type, item);
        }
    }

    public static BizActionType fromValue(String type) {
        BizActionType item = enumMap.get(type);
        return item;
    }

}
